/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/*
 * operatorHome.java
 *
 * Created on Oct 10, 2011, 3:01:37 AM
 */
package com.system.formgui.mainhome;

import com.system.formgui.Login.FormLogin;
import com.system.formgui.source.FormCariDVD_VCD;
import com.system.formgui.source.formAbout;
import com.system.formgui.source.formDVD_VCD;
import com.system.formgui.source.formJenisFilm;
import com.system.formgui.source.formLaporanDenda;
import com.system.formgui.source.formLaporanKeuangan;
import com.system.formgui.source.formPeminjam;
import com.system.formgui.source.formPeminjaman;
import com.system.formgui.source.formPengembalian;
import javax.swing.ImageIcon;

/**
 *
 * @author Pinds
 */
public class OperatorHome extends javax.swing.JFrame {

    public OperatorHome(String ID) {
        this.initComponents();
        this.setLocationRelativeTo(this);
        this.setIconImage(new ImageIcon(getClass().getResource("/com/system/formgui/images/vcd.png")).getImage());
        this.setTitle("Rental Emovie (Operator ::: " + ID + ")");
        this.formPeminjam = new formPeminjam();
        this.formPeminjam.setVisible(false);
        this.jDesktopPane1.add(formPeminjam);
        this.formJenisFilm = new formJenisFilm();
        this.formJenisFilm.setVisible(false);
        this.jDesktopPane1.add(formJenisFilm);
        this.formDVD_VCD = new formDVD_VCD();
        this.formDVD_VCD.setVisible(false);
        this.jDesktopPane1.add(formDVD_VCD);
        this.formLaporanDenda = new formLaporanDenda();
        this.formLaporanDenda.setVisible(false);
        this.jDesktopPane1.add(formLaporanDenda);
        this.formLaporanKeuangan = new formLaporanKeuangan();
        this.formLaporanKeuangan.setVisible(false);
        this.jDesktopPane1.add(formLaporanKeuangan);
        this.formPeminjaman = new formPeminjaman(ID);
        this.formPeminjaman.setVisible(false);
        this.jDesktopPane1.add(formPeminjaman);
        this.formPengembalian = new formPengembalian();
        this.formPengembalian.setVisible(false);
        this.jDesktopPane1.add(formPengembalian);
        this.FormCariDVD_VCD = new FormCariDVD_VCD();
        this.FormCariDVD_VCD.setVisible(false);
        this.jDesktopPane1.add(FormCariDVD_VCD);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar1 = new javax.swing.JToolBar();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        jMenuItem6 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jToolBar1.setBackground(new java.awt.Color(204, 255, 204));
        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/Cart.png"))); // NOI18N
        jButton1.setText("Peminjaman");
        jButton1.setFocusable(false);
        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton1);

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/Arrow_down.png"))); // NOI18N
        jButton2.setText("Pengembalian");
        jButton2.setFocusable(false);
        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton2);

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/Search.png"))); // NOI18N
        jButton3.setText("Cari DVD/VCD");
        jButton3.setFocusable(false);
        jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton3);

        jPanel1.setLayout(new java.awt.BorderLayout());

        jDesktopPane1.setBackground(new java.awt.Color(153, 204, 255));
        jPanel1.add(jDesktopPane1, java.awt.BorderLayout.CENTER);

        jMenu1.setText("File");

        jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/lightbulb_delete.png"))); // NOI18N
        jMenuItem1.setText("Logout                          ");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Peminjam");

        jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/user_edit.png"))); // NOI18N
        jMenuItem2.setText("Data Peminjam                     ");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem2);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("DVD/VCD");

        jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/file_extension_vcd.png"))); // NOI18N
        jMenuItem7.setText("Data DVD/VCD                       ");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem7);

        jMenuBar1.add(jMenu3);

        jMenu4.setText("Jenis Film");

        jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/film_add.png"))); // NOI18N
        jMenuItem3.setText("Data Jenis Film                          ");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem3);

        jMenuBar1.add(jMenu4);

        jMenu6.setText("Laporan");

        jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/report_delete.png"))); // NOI18N
        jMenuItem4.setText("Laporan Denda                          ");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItem4);

        jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/report.png"))); // NOI18N
        jMenuItem5.setText("Laporan Keuangan");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItem5);

        jMenuBar1.add(jMenu6);

        jMenu5.setText("Help");

        jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/system/formgui/images/contact_email.png"))); // NOI18N
        jMenuItem6.setText("About                          ");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItem6);

        jMenuBar1.add(jMenu5);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 642, Short.MAX_VALUE)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 642, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
    new FormLogin().setVisible(true);
    this.dispose();
}//GEN-LAST:event_jMenuItem1ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
    this.formPeminjam.setVisible(true);
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
    java.awt.EventQueue.invokeLater(new Runnable() {

        public void run() {
            formAbout dialog = new formAbout(new javax.swing.JFrame(), true);
            dialog.setVisible(true);
        }
    });
}//GEN-LAST:event_jMenuItem6ActionPerformed

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
    this.formJenisFilm.setVisible(true);
}//GEN-LAST:event_jMenuItem3ActionPerformed

private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
    this.formDVD_VCD.setVisible(true);
}//GEN-LAST:event_jMenuItem7ActionPerformed

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
    this.formLaporanKeuangan.setVisible(true);// TODO add your handling code here:
}//GEN-LAST:event_jMenuItem5ActionPerformed

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
    this.formLaporanDenda.setVisible(true);// TODO add your handling code here:
}//GEN-LAST:event_jMenuItem4ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    this.formPeminjaman.setVisible(true);
}//GEN-LAST:event_jButton1ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
    this.FormCariDVD_VCD.setVisible(true);// TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    this.formPengembalian.setVisible(true);
}//GEN-LAST:event_jButton2ActionPerformed
    private formPeminjam formPeminjam;
    private formJenisFilm formJenisFilm;
    private formDVD_VCD formDVD_VCD;
    private formLaporanDenda formLaporanDenda;
    private formLaporanKeuangan formLaporanKeuangan;
    private formPeminjaman formPeminjaman;
    private formPengembalian formPengembalian;
    private FormCariDVD_VCD FormCariDVD_VCD;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JToolBar jToolBar1;
    // End of variables declaration//GEN-END:variables
}
